Email Templates | Create a link to the manager's Actions page in WX

To create a link in an email template that directly links to the manager's Actions page in WX:

  1. Create a manager ID field on the object launching the email:

    1. Go to Setup > Object Manager, and select the object where you want to have the manager ID field available.

    2. From the sidebar, select Fields & Relationships.

    3. Select New.

    4. For the new field, select or enter the following details: 

      • For Data Type, select Formula.

      • Give a name to the field, such as Manager ID.

      • Then for the Formula Return Type, select Text.

      • Paste the following formula in the formula text box:

        Copy

        Getting the manager's Salesforce ID

        CASESAFEID(fHCM2__Employment__r.fHCM2__Team_Member__r.fHCM2__Manager__c)

        Consider the relationships between objects when adding the merge field to the formula. This

    5. Define the field level security for the field and choose if you want to add it to page layouts.

    6. Select Save.

  2. Create an action link field on the object launching the email:

    1. On the same object where you created the manager ID field, select New, and select or enter the following details: 

      • For Data Type, select Formula.

      • Give a name to the field, such as Action Link.

      • Then for the Formula Return Type, select Text.

      • Construct the URL in the formula text box as follows, replacing <my-domain-name> with the org's My Domain Name:

        Copy

        Constructing manager Actions URL

        'https://<my-domain-name>--fhcm2.vf.force.com/apex/fHCM2__CollaborationPortalIndex?id' 
        & Manager_ID__c & 
        '#/teammember/' & 
        Manager_ID__c & 
        '/actions'
    2. Define the field level security for the field and choose if you want to add it to page layouts.

    3. Select Save.

  3. Add the action link custom field to the email template:

    1. Go to Setup, and in Quick Find enter email, and select Classic Email Templates from the search results.
    2. Select the Email Template Name of the template you want to add the link to.
    3. Select Edit HTML version.
    4. Select Select Field Type and choose the object from where the email is triggered.
    5. Select Select Field field and choose the action link field you created.

    6. Copy the text from the Copy Merge Field Value field:

      Screenshot: Selecting the value from Copy Merge Field Value field

    7. In the text of the email template, highlight the text you want to use as a hyperlink to WX and then select the hyperlink icon on the Formatting Controls menu bar:

      Screenshot: Formatting the link in the email template

    8. Paste the text you previously copied from Copy Merge Field Value field into the field for the link. Select OK and then Save:

      Screenshot: Pasting the merge field into the hyperlink